<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>修改密码</title>
	<meta name="decorator" content="default"/>
	<style>
		html,body,table{width:100%;text-align:center;}
		.form-signin-heading{font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu;font-size:36px;margin-bottom:20px;color:#0663a2;}
		.form-horizontal{position:relative;text-align:left;width:600px;padding:25px 29px 29px;margin:0 auto 20px;}
	</style>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#oldPassword").focus();
			$("#inputForm").validate({
				rules: {
				},
				messages: {
					confirmNewPassword: {equalTo: "<spring:message code='common.confirmpasswordtips'/>"}
				},
				submitHandler: function(form){
					loading('<spring:message code="common.subbmiting"/>');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});

			$("#btnMenu").remove();
		});
	</script>
</head>
<body>
<div style="margin-top: 100px;">
	<img src="${ctxStatic}/images/bg.png" style=" position: absolute; bottom: 0; z-index: -1; "/>
	<%--<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/sys/user/modifyPwd">修改密码</a></li>
	</ul><br/>--%>
	<h1 class="form-signin-heading"><spring:message code="common.changepassword"/></h1>
	<form:form id="inputForm" modelAttribute="user" action="${ctx}/sys/user/modifyPwd" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>
		<div class="control-group">
			<label class="control-label"><spring:message code='common.oldpassword'/>:</label>
			<div class="controls">
				<input id="oldPassword" name="oldPassword" type="password" value="" maxlength="50" minlength="3" class="required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label"><spring:message code='common.newpassword'/>:</label>
			<div class="controls">
				<input id="newPassword" name="newPassword" type="password" value="" maxlength="50" minlength="3" class="required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label"><spring:message code='common.confirmpassword'/>:</label>
			<div class="controls">
				<input id="confirmNewPassword" name="confirmNewPassword" type="password" value="" maxlength="50" minlength="3" class="required" equalTo="#newPassword"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="form-actions" style="background-color:inherit">
			<input id="btnSubmit" class="btn btn-primary" style="width: 96px;" type="submit" value="<spring:message code='common.save'/>"/>
			<a href="${ctx}/logout" class="btn btn-danger" style="margin-left: 20px;"><spring:message code='common.exit'/></a>
		</div>
	</form:form>
</div>
</body>
</html>